package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 采购记录管理对象 purchase_records
 *
 * @author ruoyi
 * @date 2025-03-19
 */
public class PurchaseRecords extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 采购记录唯一标识
     */
    private Long recordId;

    /**
     * 采购记录编码（如：PR202409001）
     */
    @Excel(name = "采购记录编码", readConverterExp = "如=：PR202409001")
    private String recordCode;

    /**
     * 备件编号（如：SP001）
     */
    @Excel(name = "备件编号", readConverterExp = "如=：SP001")
    private String sparePartNo;

    /**
     * 备件名称（如：轴承）
     */
    @Excel(name = "备件名称", readConverterExp = "如=：轴承")
    private String sparePartName;

    /**
     * 采购数量（如：100件）
     */
    @Excel(name = "采购数量", readConverterExp = "如=：100件")
    private Long quantity;

    /**
     * 供应商名称（如：XX机械有限公司）
     */
    @Excel(name = "供应商名称", readConverterExp = "如=：XX机械有限公司")
    private String supplierName;

    /**
     * 采购员姓名（如：张三）
     */
    @Excel(name = "采购员姓名", readConverterExp = "如=：张三")
    private String purchaserName;

    /**
     * 采购下单时间
     */
    @Excel(name = "采购下单时间")

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date purchaseTime;

    /**
     * 状态：未入库（UNSTOCKED）、已入库（STOCKED）
     */
    @Excel(name = "状态：未入库", readConverterExp = "U=NSTOCKED")
    private String status;

    public void setRecordId(Long recordId) {
        this.recordId = recordId;
    }

    public Long getRecordId() {
        return recordId;
    }

    public void setRecordCode(String recordCode) {
        this.recordCode = recordCode;
    }

    public String getRecordCode() {
        return recordCode;
    }

    public void setSparePartNo(String sparePartNo) {
        this.sparePartNo = sparePartNo;
    }

    public String getSparePartNo() {
        return sparePartNo;
    }

    public void setSparePartName(String sparePartName) {
        this.sparePartName = sparePartName;
    }

    public String getSparePartName() {
        return sparePartName;
    }

    public void setQuantity(Long quantity) {
        this.quantity = quantity;
    }

    public Long getQuantity() {
        return quantity;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setPurchaserName(String purchaserName) {
        this.purchaserName = purchaserName;
    }

    public String getPurchaserName() {
        return purchaserName;
    }

    public void setPurchaseTime(Date purchaseTime) {
        this.purchaseTime = purchaseTime;
    }

    public Date getPurchaseTime() {
        return purchaseTime;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("recordId", getRecordId())
                .append("recordCode", getRecordCode())
                .append("sparePartNo", getSparePartNo())
                .append("sparePartName", getSparePartName())
                .append("quantity", getQuantity())
                .append("supplierName", getSupplierName())
                .append("purchaserName", getPurchaserName())
                .append("purchaseTime", getPurchaseTime())
                .append("status", getStatus())
                .append("remark", getRemark())
                .append("updateTime", getUpdateTime())
                .append("updateBy", getUpdateBy())
                .append("createTime", getCreateTime())
                .append("createBy", getCreateBy())
                .toString();
    }
}
